﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Codebehind="RptDepartStatistics.aspx.cs" Inherits="Ankin.EHBH.Web.Modules.Reports.RptDepartStatistics"
    Title="医用耗材管理系统" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphcenter" runat="server">

    <script language="javascript" type="text/javascript">

   /*   */
    function btDeptCodeClick(deptcode)
    {
       document.getElementById("<%=deptcode.ClientID%>").value = deptcode;
       document.getElementById("<%=btShwSta.ClientID%>").click();

    }
    </script>

    <script language="javascript" type="text/javascript" src="../../Public/My97DatePicker/WdatePicker.js"></script>

    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="right-color">
                统计报告--明细统计报告</td>
        </tr>
    </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top: 14px;">
        <tr>
            <td class="bor bor-bg">
                统计条件</td>
        </tr>
        <tr>
            <td class="bor">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="t1">
                    <tr>
                        <td align="right" height="35">
                            统计区间：
                        </td>
                        <td>
<input id="inptStartDate" type="text" onclick="WdatePicker({maxDate:'%y-%M-%d'})" runat="server" style="width: 110px"/>
～
<input id="inptEndDate" type="text" onclick="WdatePicker({maxDate:'%y-%M-%d'})" runat="server" style="width: 110px"/>
                        </td>
                        <td>
                            <asp:Button ID="btnViewRpt" runat="server" Text="查看报表" OnClick="btnViewRpt_Click"
                                CssClass="longbutton" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top: 14px;">
        <tr>
            <td class="bor bor-bg">
                查询结果</td>
        </tr>
        <tr>
            <td class="bor" style="padding: 13px;">
                <asp:GridView ID="grvDeptStat" runat="server" AutoGenerateColumns="False" PageSize="10"
                    Width="100%" EnableViewState="False">
                    <RowStyle CssClass="gv-first-line" />
                    <EmptyDataTemplate>
                        <table width="100%" height="100">
                            <tr>
                                <td align="center" class="jg">
                                    对不起，没有找到任何相关记录
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:TemplateField HeaderText="部门名称" SortExpression="DEPTNAME">
                            <ItemTemplate>
                                <asp:Label ID="lbDEPTNAME" runat="server" Text='<%# Eval("DEPTNAME") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="领取金额" SortExpression="PRICE">
                            <ItemTemplate>
                                <asp:Label ID="lbPRICE" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"PRICE","{0:N2}") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <table width="57" border="0" cellspacing="0" cellpadding="0" align="center">
                                    <tr>
                                        <td align="center" class="button" style="padding-top: 2px; height: 25px;">
                                            <a href='javascript:btDeptCodeClick("<%# Eval("DEPTCODE") %>")'>
                                                查看</a>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                            <ControlStyle Width="140px" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle CssClass="fy" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="Black" />
                    <HeaderStyle CssClass="gv-head" />
                    <EditRowStyle BackColor="Black" />
                    <AlternatingRowStyle BackColor="White" />
                    <PagerSettings Mode="NumericFirstLast" FirstPageText="首页" LastPageText="末页"/>
                </asp:GridView>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin-top: 14px;">
                    <tr>
                        <td class="bm">
                            <asp:Label ID="labTotPrice" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td height="40">
                            <asp:Button ID="btnExport" runat="server" Text="导出数据" 
                                CssClass="longbutton" Width="90" Height="25" Style="cursor: pointer;" OnClick="btnExport_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div style="display: none; height: 0">
        <asp:Button ID="btShwSta" runat="server" Text="btShwSta" OnClick="btShwSta_Click" />
        <asp:HiddenField ID="deptcode" runat="server" Value="" />
    </div>
</asp:Content>
